package com.none.web.service.activity;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import spring.mvc.bind.annotation.FormModel;

import com.none.core.model.Pager;
import com.none.web.model.TActivity;
import com.none.web.model.TActivityAppUser;

/**
 * activity(活动)业务处理类（service）
 * @author Dave
 * @timer  20141106
 */
public interface IActivityService {
	
    /**pc
     * 保存活动草稿
     */
	public boolean saveDraft(TActivity activity,String startTime,String endTime,String deadline,String tags,String userId,String push,HttpServletRequest request,String pushcontent) throws Exception;
	/**pc
     * 创建活动
     */
	public boolean createActivity(TActivity activity,String startTime,String endTime,String deadline,String tags,String userId,String push,HttpServletRequest request,String pushcontent) throws Exception;
	
	/**
	 * PC
	 * 修改活动  
	 * @author Bing  
	 * @times  2014-11-07
	 * @param  activity 
	 * 		   tags
	 *         userId
	 * return 修改后的活动
	 */
	public Object editActivity(TActivity activity,String startTime,String endTime,String deadline,String tags,String userId,String push,HttpServletRequest request,String pushcontent) throws Exception;
	
	/**
	 * pc
     * 删除活动
     * @author Bing  
	 * @times  2014-11-07
	 * @param  activityId 活动ID
     * 
     */
	public boolean deleteActivity(String activityId,String userId) throws Exception;
	
	
	/**
	 * pc
     * 等待审核的活动
     * @author Bing  
	 * @times  2014-11-07
     * return  list
     */
	public Object listPending_review(Pager pager, String userId)throws Exception;
	
	/**
	 * pc
     * 审核活动---通过
     * @author Bing  
	 * @times  2014-11-07
     */
	public Object review(TActivity activity,String startTime,String endTime,String deadline, String tags, String userId,String push,HttpServletRequest request,String pushcontent) throws Exception;
	
	/**
	 * pc
     * 审核活动---拒绝
     * @author Bing  
	 * @times  2014-11-07
     */
	public Object reject(String activityId,String userId,HttpServletRequest request) throws Exception;
	
	/**
	 * pc
     * 搜索活动
     * @author Bing  
	 * @times  2014-11-07
     * list
     */
	public Object search(Pager pager,String keyWord,String startTime,String endTime,String tags,String userId,String status) throws Exception;
	
	/**
	 * pc
     * 正在进行中的活动
     * @author Bing  
	 * @times  2014-11-07
     * list
     */
	public Object ongoing(String userId) throws Exception;
	
	/**
	 * pc
     * 正在进行中的活动报名情况
     * @author Bing  
	 * @times  2014-11-07
     * list
     */
	public Object ongoing_view(Pager pager,String activityId,String userId) throws Exception;
	
	/**
	 * pc
     * 导出某个活动的详细信息
     * @author Bing  
	 * @times  2014-11-07
     * param:exportType    如果值为“excel”就导出excel，如果是“txt”就导出txt文件，默认导出txt文件
     */
	public boolean export(String exportType,String activityId,String userId,HttpServletRequest request, HttpServletResponse response) throws Exception;
	
	/**
	 * pc
     * 查询所有活动
     * @author Bing  
	 * @times  2014-11-07
     * 只有AdminConsole可以使用
     */
	public Object adminShow(Pager pager,String userId) throws Exception;
	/**
	 * APP
     * 展示活动
     * @author Bing  
	 * @times  2014-11-08
     * 只有app用户可以使用
     */
	public Object show(Pager pager, String keyword, String tagNames,String userId) throws Exception;
	
	
	
	
	
	
	
	
	/**
	 * app端用户报名
	 *  Dave20141108
	 */
	public boolean joinActivity(@FormModel("app") final TActivityAppUser app,String activityId,String userId)  throws Exception;
	
	/**
	 * check checkActivity add by william 2014-12-11
	 * @param activityId
	 * @param userId
	 * @return
	 */
	public String checkActivity(String activityId,String userId);
	
	/**
	 * app端点击推送的消息后获取该消息的详细信息
	 * @param activityId
	 * @param type
	 * @param userId
	 * @param appOrPCFlag   pc端调用传PC、APP端调用传APP
	 * @return
	 * @throws Exception
	 */
	public Object getActivityDetialInfo(String activityId,String type,String userId,String appOrPCFlag) throws Exception;
}
